import { createRouter, createWebHashHistory } from 'vue-router'
import List from '../views/List.vue'
import ScheduleList from '../views/ScheduleList.vue'
import Upload from '../views/Upload.vue'
let router = createRouter({
    history: createWebHashHistory(),
    routes: [
        { path: '/', redirect: '/hello' },
        { path: '/hello', component: List },
        { path: '/scheduleList', component: ScheduleList },
        { path: '/upload', component: Upload },
    ]
})
//路由前置守卫
router.beforeEach((to, from, next) => {
    console.log(to.path, from.path)
    next()
})

export default router